Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IA-4175] delete disk wsm dao removal #4752

Merged
merged 6 commits into from
Aug 27, 2024
Merged

Conversation

jdcanas
Copy link
Contributor

@jdcanas jdcanas commented Aug 19, 2024

Jira ticket: https://broadworkbench.atlassian.net/browse/[ticket_number]

Summary of changes

What

Why

Testing these changes

What to test

Who tested and where

  • This change is covered by automated tests
    • NB: Rerun automation tests on this PR by commenting jenkins retest or jenkins multi-test.
  • I validated this change
  • Primary reviewer validated this change
  • I validated this change in the dev environment

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.17%. Comparing base (4f47442) to head (630f026).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #4752       +/-   ##
============================================
+ Coverage         0   74.17%   +74.17%     
============================================
  Files            0      161      +161     
  Lines            0    14941    +14941     
  Branches         0     1226     +1226     
============================================
+ Hits             0    11082    +11082     
- Misses           0     3859     +3859     
Files Coverage Δ
...itute/dsde/workbench/leonardo/dao/HttpWsmDao.scala 74.79% <ø> (ø)
...institute/dsde/workbench/leonardo/dao/WsmDao.scala 40.90% <ø> (ø)
.../dsde/workbench/leonardo/util/AKSInterpreter.scala 88.64% <ø> (ø)
...e/workbench/leonardo/util/AzurePubsubHandler.scala 84.66% <100.00%> (ø)

... and 157 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f47442...630f026. Read the comment docs.

@jdcanas jdcanas changed the title [draft] delete disk wsm daoo removal [draft] delete disk wsm dao removal Aug 20, 2024
@jdcanas jdcanas marked this pull request as ready for review August 20, 2024 20:39
Copy link
Collaborator

@LizBaldo LizBaldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but I think it needs more comments explaining what stays in the legacy DAO and why. It seems like there is more than the Landing Zone logic remaining

)
)(onError)
} yield res

override def getWorkspaceStorageContainer(workspaceId: WorkspaceId, authorization: Authorization)(implicit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be removed as well? My understanding was that only the Landing Zone related calls would remain in this legacy DAO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This some pretty specific business logic we do here that dependent on our current decoding I'd rather not redo. I'll comment both.

import org.broadinstitute.dsde.workbench.leonardo.db.WsmResourceType
import org.broadinstitute.dsde.workbench.leonardo.util.AppCreationException
import org.broadinstitute.dsde.workbench.model.TraceId
import org.broadinstitute.dsde.workbench.openTelemetry.OpenTelemetryMetrics
import org.http4s._
import org.http4s.circe.CirceEntityDecoder._
import org.http4s.circe.CirceEntityEncoder._
import org.http4s.client.Client
import org.http4s.client.dsl.Http4sClientDsl
import org.http4s.headers.{`Content-Type`, Authorization}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to document this file with a Header explaining that this is a legacy DAO that should not be modified other than eventually removing the Landing Zone Logic.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not seeing a commit with these headers / comments. Are these coming as part of another PR? It could be part of this PR honestly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added them to the interface WsmDao instead of this concrete implementation

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry could you point me to it? I can't find it 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops apparently I needed to force-push 😅

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha no worries, I see it now, looks good 👍

@@ -76,8 +76,6 @@ final class AdminServiceInterpSpec extends AnyFlatSpec with LeonardoTestSuite wi
val savedNodepool = makeNodepool(1, cluster1.id).save()
val app1 =
makeApp(1, savedNodepool.id, status = AppStatus.Running, appType = AppType.Cromwell, chart = v1Chart).save()
val app2 =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also clean up the V2 chart above if this is unused?

@@ -191,7 +179,6 @@ class AzurePubsubHandlerSpec
} yield {
getRuntime.asyncRuntimeFields.flatMap(_.hostIp).isDefined shouldBe true
getRuntime.status shouldBe RuntimeStatus.Running
getRuntime.auditInfo.dateAccessed.isAfter(startTime.plusMillis(mockLatencyMillis)) shouldBe true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mlilynolting, this line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc this was verifying that the creation time was being recorded as when create finished, instead of when the create request was received. Is the check causing problems?

@mlilynolting
Copy link
Contributor

If all the touched actions still work properly i'm 👍

@jdcanas jdcanas changed the title [draft] delete disk wsm dao removal [IA-4175] delete disk wsm dao removal Aug 27, 2024
@jdcanas jdcanas requested a review from LizBaldo August 27, 2024 15:29
@jdcanas jdcanas merged commit 54c8a19 into develop Aug 27, 2024
23 of 24 checks passed
@jdcanas jdcanas deleted the jc-remove-wsm-dao-pt2 branch August 27, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants